<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="dragon.core.util.GlobalParameter" %>
<%@ include file="../../taglib.jsp"%>
<%
	String contextPath = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + contextPath + "/";
	String theme = request.getParameter("theme");
	if (theme != null) {
		if ("1".equals(theme.trim())) {
			theme = "default";
		} else if ("2".equals(theme.trim())) {
			theme = "cupertino";
		} else if ("3".equals(theme.trim())) {
			theme = "sunny";
		}
		if (theme != null && !theme.equals(session.getAttribute(GlobalParameter.Theme))) {
			session.setAttribute(GlobalParameter.Theme, theme);
		}
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/menu.css" />
<%@ include file="/webmodules/console/css.jsp"%>
<%@ include file="/webmodules/console/js.jsp"%>
<script type="text/javascript" src="js/jquery.wresize.js"></script>
<script>
	$(function() {
		$('body').append('<div id="myWindow" class="easyui-dialog" closed="true"></div>');
		$('body').append('<div id="errorWindow" class="easyui-dialog" closed="true"></div>');
		$.get('dragon/modules/system/menu/action/UserMenuHandler.ejw',{},function(data){
			$('#menus').html("<div class='easyui-accordion'>"+data+"</div>");
			$.parser.parse('#menus');
		});
		openTab("首页","webmodules/console/home.jsp",null,null,false);
	});
	function logout(){
		$.post("dragon/core/auth/Login/logoutViaAjax.ejw", {
		}, function(r) {
			if('T'==r.trim()){
				parent.location.href='<u:webRoot/>/webmodules/console/login.jsp';
			};
		});
	}
</script>
</head>
<body class="easyui-layout">
	<div region="north" border="false" style="overflow:hidden;height:70px;" class="console">
		<div class=logo>
			
		</div>
		<div class="logoinfo">
			&nbsp;&nbsp;&nbsp;&nbsp;<a href="<u:webRoot/>" target="_blank" class="linkasnormal" title="点此访问网站首页">${WebSiteName }</a>
		</div>
		<div class="userinfo">
			<div>
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true">欢迎你 <font style="font-weight: bold;">${User.username }</font></a>
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" onclick="showWindow('SelfInfo','我的信息', 'webmodules/system/user/userInfo.jsp',500,225,false)">我的信息</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" onclick="showConfirm('注销确认','确认注销登录？',logout,null);">注销</a>
			</div>
			<div>
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true">${User.orgName}</a>
			</div>
		</div>
	</div>
	<div id="menus" region="west" split="true" title="菜单" style="width: 200px; overflow-x: hidden; border: 0;" class="easyui-accordion">
	</div>
	<div region="center" style="overflow:hidden;">
		<div id="tabsconetnt" class="easyui-tabs" data-options="tools:'#tab-tools'" fit="true" border="false"></div>
	</div>
	<div id="tab-tools">
		<a href="webmodules/console/index.jsp?theme=1" class="easyui-linkbutton" data-options="plain:true,iconCls:''">A</a>
		<a href="webmodules/console/index.jsp?theme=2" class="easyui-linkbutton" data-options="plain:true,iconCls:''">B</a>
		<a href="webmodules/console/index.jsp?theme=3" class="easyui-linkbutton" data-options="plain:true,iconCls:''">C</a>
	</div>
</body>
</html>